<!-- include tpl=head_lay -->
<script type="text/javascript">
    function edit_price(code) {
        var url = get_url('site', 'price_status_save', 'id=' + code);
        var title = $("#price_title_" + code).val();
        if (title) {
            url += "&title=" + $.str.encode(title);
        }
        var action = $("#price_action_" + code).val();
        if (action) {
            url += "&action=" + $.str.encode(action);
        }
        var status = $("#price_status_" + code).val();
        if (status) {
            url += "&status=" + $.str.encode(status);
        }
        var taxis = $("#price_taxis_" + code).val();
        if (taxis) {
            url += "&taxis=" + $.str.encode(taxis);
        }
        $.phpok.json(url, function (rs) {
            if (rs.status == 'ok') {
                $.dialog.tips('标识：<span class="red">' + code + '</span> 配置更新成功');
            } else {
                $.dialog.alert(rs.content);
                return false;
            }
        });
    }
</script>
<div class="layui-card">
    <div class="layui-card-header">{lang前台订单状态}</div>
    <div class="layui-card-body">
        <table class="layui-table">
            <thead>
            <tr>
                <th class="lft">{lang标识}</th>
                <th>{lang排序}</th>
                <th class="lft">{lang名称}</th>
                <th>{lang状态}</th>
                <th class="lft">{lang通知用户}</th>
                <th class="lft">{lang通知管理员}</th>
                <th>&nbsp;</th>
            </tr>
            </thead>
            <tbody>
            <!-- loop from=$rslist key=$key value=$value -->
            <tr>
                <td>{$value.identifier}</td>
                <td>{$value.taxis}</td>
                <td>{$value.title}</td>
                <td>
	                <!-- if $value.status -->
	                {lang启用}
	                <!-- else -->
	                <span class="red">{lang禁用}</span>
                    <!-- /if -->
                </td>
                <td>
                    <!-- if !$value.email_tpl_user && !$value.sms_tpl_user -->
                    <span class="red">不通知</span>
                    <!-- /if -->
                    <!-- if $value.email_tpl_user && $value.sms_tpl_user -->
                    邮件 + 短信
                    <!-- else -->
                    	<!-- if $value.email_tpl_user -->邮件<!-- /if -->
                    	<!-- if $value.sms_tpl_user -->短信<!-- /if -->
                    <!-- /if -->
                </td>
                <td>
                    <!-- if !$value.email_tpl_admin && !$value.sms_tpl_admin -->
                    <span class="red">不通知</span>
                    <!-- /if -->
                    <!-- if $value.email_tpl_admin && $value.sms_tpl_admin -->
                    邮件 + 短信
                    <!-- else -->
                    	<!-- if $value.email_tpl_admin -->邮件<!-- /if -->
                    	<!-- if $value.sms_tpl_admin -->短信<!-- /if -->
                    <!-- /if -->
                </td>
                <td>
	                <input type="button" value="{lang编辑}" onclick="$.admin_site.order_edit('{$value.identifier}')" class="layui-btn layui-btn-sm"/>
	            </td>
            </tr>
            <!-- /loop -->
            </tbody>
        </table>
    </div>
</div>
<div class="layui-card">
    <div class="layui-card-header">{lang后台订单状态}</div>
    <div class="layui-card-body">
        <table class="layui-table">
            <thead>
            <tr>
                <th class="lft">{lang标识}</th>
                <th>{lang排序}</th>
                <th class="lft">{lang名称}</th>
                <th class="lft">{lang前台订单状态}</th>
                <th>{lang状态}</th>
                <th><input type="button" value="{lang添加}" onclick="$.admin_site.adm_add_it()" class="layui-btn layui-btn-sm"/></th>
            </tr>
            </thead>
            <tbody>
            <!-- loop from=$admin_statuslist key=$key value=$value -->
            <tr>
                <td>{$value.identifier}</td>
                <td>{$value.taxis}</td>
                <td>{$value.title}</td>
                <td>{$value.ostatus}</td>
                <td>
	                <!-- if $value.status -->
	                {lang启用}
	                <!-- else -->
	                <span class="red">{lang禁用}</span>
                    <!-- /if -->
                </td>
                <td>
	                <div class="layui-btn-group">
	                
	                <input type="button" value="{lang编辑}" onclick="$.admin_site.adm_edit_it('{$value.identifier}')" class="layui-btn layui-btn-sm"/>
	                <input type="button" value="{lang删除}" onclick="$.admin_site.delete_it('{$value.identifier}',this)" class="layui-btn layui-btn-sm layui-btn-danger"/>
	                </div>
                </td>
            </tr>
            <!-- /loop -->
            </tbody>
        </table>
    </div>
</div>
<div class="layui-card">
    <div class="layui-card-header">{lang订单价格方案}</div>
    <div class="layui-card-body layui-form">
        <table class="layui-table">
            <colgroup>
                <col>
                <col>
                <col width="110">
                <col>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th width="100">标识</th>
                <th>名称</th>
                <th>默认值</th>
                <th>金额动作</th>
                <th>状态</th>
                <th>0或空隐藏</th>
                <th>排序</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <!-- loop from=$pricelist key=$key value=$value -->
            <tr>
                <td>{$value.identifier}</td>
                <td>{$value.title}</td>
                <td>
	                {$value.default}
                </td>
                <td>
	                <!-- if $value.action == 'add' -->+<!-- else -->-<!-- /if -->
                </td>
                <td>
	                <!-- if $value.status -->
	                {lang启用}
	                <!-- else -->
	                <span class="red">{lang禁用}</span>
                    <!-- /if -->
                </td>
                <td>
	                <!-- if $value.hidden -->
	                <span class="red">{lang隐藏}</span>
	                <!-- else -->
	                {lang显示}
                    <!-- /if -->
                </td>
                <td>
	                {$value.taxis}
                </td>
                <td><input type="button" value="{lang编辑}" onclick="$.admin_site.edit_price('{$value.identifier}')" class="layui-btn layui-btn-sm"/></td>
            </tr>
            <!-- /loop -->
            </tbody>
        </table>
    </div>
</div>
<script>
    layui.use(['form']);

</script>
<!-- include tpl=foot_lay -->